package com.test.fileParse;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * @Description:
 * @Author: yangzhiwei
 * @Date: 2020/11/14 15:42
 */
public class PropertyParser {
    public static void main(String[] args) throws IOException {
           InputStream inputStream =  ClassLoader.getSystemResourceAsStream("property/application.properties");
        Properties properties = new Properties();
        properties.load(inputStream);
        System.out.println(PropertyParser.class.getClassLoader().getResource("META-INF/NOTICE.txt").getPath());
        System.out.println(PropertyParser.class.getClassLoader().getResource("META-INF/NOTICE.txt").getPath());
        System.out.println(PropertyParser.class.getClassLoader().getResource(
                "/resources/NOTICE.txt").getPath());

        System.out.println("cookie :" + properties.getProperty("cookie"));;
    }
}
